package com.yy.module.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import org.hibernate.annotations.GenericGenerator;
import com.yy.base.common.entity.BaseEntity;

/**
 * 系统表
 */
@Entity
@javax.persistence.Table(name="t_table")
public class Table extends BaseEntity {
	private String id;
	private String parentId;//归属表类别
	private String baseName;//数据库名
	private String name;//表名
	private String text;//表名称
	private Integer isParent = 0;//是否是表的类型
	private String tableType;//表类型（年表、月表、分区表）暂时不使用
	private String remark;

	@Id
	@Column(name="ID", length = 32, nullable = false)
    @GeneratedValue(generator = "uuid2" )//指定生成器名称
    @GenericGenerator(name = "uuid2", strategy = "org.hibernate.id.UUIDGenerator" )
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getParentId() {
		return parentId;
	}
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	public String getBaseName() {
		return baseName != null ? baseName.toUpperCase() : baseName;
	}
	public void setBaseName(String baseName) {
		this.baseName = baseName;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getName() {
		return name != null ? name.toUpperCase() : name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getTableType() {
		return tableType;
	}
	public void setTableType(String tableType) {
		this.tableType = tableType;
	}
	public Integer getIsParent() {
		return isParent;
	}
	public void setIsParent(Integer isParent) {
		this.isParent = isParent;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}